package com.lws.omapicompat.google

import android.os.Build
import android.se.omapi.Channel
import androidx.annotation.RequiresApi
import com.lws.omapicompat.ChannelCompat
import com.lws.omapicompat.SessionCompat

@RequiresApi(Build.VERSION_CODES.P)
class ChannelNew(private val sessionNew: SessionNew, private val channel: Channel) : ChannelCompat {

    override fun close() {
        channel.close()
    }

    override fun getSelectResponse(): ByteArray? {
        return channel.selectResponse
    }

    override fun getSession(): SessionCompat {
        return sessionNew
    }

    override fun isBasicChannel(): Boolean {
        return channel.isBasicChannel
    }

    override fun isOpen(): Boolean {
        return channel.isOpen
    }

    override fun selectNext(): Boolean {
        return channel.selectNext()
    }

    override fun transmit(command: ByteArray): ByteArray {
        return channel.transmit(command)
    }
}